// --------------------------------------------------------------------------------------------
// Version: MPL 1.1/GPL 2.0/LGPL 2.1
// 
// The contents of this file are subject to the Mozilla Public License Version
// 1.1 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
// http://www.mozilla.org/MPL/
// 
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
// for the specific language governing rights and limitations under the
// License.
// 
// <remarks>
// Generated by IDLImporter from file nsIParentalControlsService.idl
// 
// You should use these interfaces when you access the COM objects defined in the mentioned
// IDL/IDH file.
// </remarks>
// --------------------------------------------------------------------------------------------
namespace Gecko
{
	using System;
	using System.Runtime.InteropServices;
	using System.Runtime.InteropServices.ComTypes;
	using System.Runtime.CompilerServices;
	
	
	/// <summary>
    ///This Source Code Form is subject to the terms of the Mozilla Public
    /// License, v. 2.0. If a copy of the MPL was not distributed with this
    /// file, You can obtain one at http://mozilla.org/MPL/2.0/. </summary>
	[ComImport()]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("2e97e5dd-467b-4aea-a1bb-6773c0f2beb0")]
	public interface nsIParentalControlsService
	{
		
		/// <summary>
        /// @returns true if the current user account has parental controls
        /// restrictions enabled.
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool GetParentalControlsEnabledAttribute();
		
		/// <summary>
        /// @returns true if the current user account parental controls
        /// restrictions include the blocking of all file downloads.
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool GetBlockFileDownloadsEnabledAttribute();
		
		/// <summary>
        /// Check if the user can do the prescibed action for this uri.
        ///
        /// @param aAction             Action being performed
        /// @param aUri                The uri requesting this action
        /// @param aWindow             The window generating this event.
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool IsAllowed(short aAction, [MarshalAs(UnmanagedType.Interface)] nsIURI aUri);
		
		/// <summary>
        /// Request that blocked URI(s) be allowed through parental
        /// control filters. Returns true if the URI was successfully
        /// overriden. Note, may block while native UI is shown.
        ///
        /// @param aTarget(s)          URI to be overridden. In the case of
        /// multiple URI, the first URI in the array
        /// should be the root URI of the site.
        /// @param window              Window that generates the event.
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool RequestURIOverride([MarshalAs(UnmanagedType.Interface)] nsIURI aTarget, [MarshalAs(UnmanagedType.Interface)] nsIInterfaceRequestor aWindowContext);
		
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool RequestURIOverrides([MarshalAs(UnmanagedType.Interface)] nsIArray aTargets, [MarshalAs(UnmanagedType.Interface)] nsIInterfaceRequestor aWindowContext);
		
		/// <summary>
        /// @returns true if the current user account has parental controls
        /// logging enabled. If true, applications should log relevent events
        /// using 'log'.
        /// </summary>
		[return: MarshalAs(UnmanagedType.U1)]
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		bool GetLoggingEnabledAttribute();
		
		/// <summary>
        /// Log an application specific parental controls
        /// event.
        ///
        /// @param aEntryType       Constant defining the type of event.
        /// @param aFlag            A flag indicating if the subject content
        /// was blocked.
        /// @param aSource          The URI source of the subject content.
        /// @param aTarget          The location the content was saved to if
        /// no blocking occurred.
        /// </summary>
		[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)]
		void Log(short aEntryType, [MarshalAs(UnmanagedType.U1)] bool aFlag, [MarshalAs(UnmanagedType.Interface)] nsIURI aSource, [MarshalAs(UnmanagedType.Interface)] nsIFile aTarget);
	}
	
	/// <summary>nsIParentalControlsServiceConsts </summary>
	public class nsIParentalControlsServiceConsts
	{
		
		// <summary>
        // Action types that can be blocked for users.
        // </summary>
		public const short DOWNLOAD = 1;
		
		// <summary>
        // Downloading files
        // </summary>
		public const short INSTALL_EXTENSION = 2;
		
		// <summary>
        // Installing extensions
        // </summary>
		public const short INSTALL_APP = 3;
		
		// <summary>
        // Installing webapps
        // </summary>
		public const short BROWSE = 4;
		
		// <summary>
        // Opening specific urls
        // </summary>
		public const short SHARE = 5;
		
		// <summary>
        // Sharing
        // </summary>
		public const short BOOKMARK = 6;
		
		// <summary>
        // Creating bookmarks
        // </summary>
		public const short ADD_CONTACT = 7;
		
		// <summary>
        // Add contacts to the system database
        // </summary>
		public const short SET_IMAGE = 8;
		
		// <summary>
        // Setting images as wall paper
        // </summary>
		public const short MODIFY_ACCOUNTS = 9;
		
		// <summary>
        // Modifying system accounts
        // </summary>
		public const short REMOTE_DEBUGGING = 10;
		
		// <summary>
        // Remote debugging
        // </summary>
		public const short IMPORT_SETTINGS = 11;
		
		// <summary>
        // Importing settings from other apps
        // </summary>
		public const short PRIVATE_BROWSING = 12;
		
		// <summary>
        // Disallow usage of private browsing
        // </summary>
		public const short DATA_CHOICES = 13;
		
		// <summary>
        // Choose whether or not to send usage information
        // </summary>
		public const short CLEAR_HISTORY = 14;
		
		// <summary>
        // Clear browsing history
        // </summary>
		public const short MASTER_PASSWORD = 15;
		
		// <summary>
        // Setting master password for logins
        // </summary>
		public const short GUEST_BROWSING = 16;
		
		// <summary>
        // Disallow usage of guest browsing
        // </summary>
		public const short ADVANCED_SETTINGS = 17;
		
		// <summary>
        // Advanced settings
        // </summary>
		public const short CAMERA_MICROPHONE = 18;
		
		// <summary>
        // Camera and microphone (WebRTC)
        // </summary>
		public const short TELEMETRY = 19;
		
		// <summary>
        // Submit telemetry data
        // </summary>
		public const short HEALTH_REPORT = 20;
		
		// <summary>
        // Submit FHR data
        // </summary>
		public const short DEFAULT_THEME = 21;
		
		// <summary>
        // Log entry types. Additional types can be defined and implemented
        // as needed. Other possible event types might include email events,
        // media related events, and IM events.
        // </summary>
		public const short ePCLog_URIVisit = 1;
		
		// <summary>
        //Web content </summary>
		public const short ePCLog_FileDownload = 2;
	}
}
